package com.yc.myspringboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

import com.yc.myspringboot.service.d1.TestService;
import com.yc.myspringboot.test.Student;

@ServletComponentScan
@MapperScan("com.yc.myspringboot.mapper")
@SpringBootApplication
//@ComponentScan(basePackages = {"com.yc.*"})
@EnableAsync
@EnableCaching
public class Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext application = SpringApplication.run(Application.class, args);
//		System.out.println("------over-----");
//		TestService ts = application.getBean(TestService.class);
//		ts.m();
//		Student st = application.getBean(Student.class);
//		System.out.println(">>>>>" + st.getName());
		
		
	}
}
